﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DiveManager
{
    public partial class ConfigForm : Form
    {
        private SyncDatabase syncDatabase = new  SyncDatabase();

        public ConfigForm()
        {
            InitializeComponent();
        }

        private void cmdSetupSync_Click(object sender, EventArgs e)
        {
            txOutput.Text += "Setup gestartet" + System.Environment.NewLine; ;

            syncDatabase.Setup();

            txOutput.Text += "Setup beendet" + System.Environment.NewLine; ;
        }

        private void cmdRemoveSync_Click(object sender, EventArgs e)
        {
            txOutput.Text += "Remove gestartet" + System.Environment.NewLine; ;

            syncDatabase.Remove();

            txOutput.Text += "Remove beendet" + System.Environment.NewLine; ;
        }

        private void cmdSync_Click(object sender, EventArgs e)
        {
            txOutput.Text += "Sync gestartet" + System.Environment.NewLine;

            string output =  syncDatabase.StartSync();

            txOutput.Text += output + System.Environment.NewLine; ;
        }
    }
}
